#include "testbase.h"
#include "ui_testbase.h"
#include "testdialog.h"
#include "wizard.h"

testbase::testbase(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::testbase)
{
    ui->setupUi(this);
}

testbase::~testbase()
{
    delete ui;
}

void testbase::on_ButtonTest_clicked()
{
    testDialog *test=new testDialog();
    test->setModal(true);
    test->move((QApplication::desktop()->width()- test->width())/2, (QApplication::desktop()->height() - test->height())/2);
    test->show();


}

void testbase::on_ButtonQuestion_clicked()
{
    MainWindow *main=new MainWindow();
    main->move((QApplication::desktop()->width()- main->width())/2, (QApplication::desktop()->height() - main->height())/2);

    main->show();
}

void testbase::on_ButtonPaper_clicked()
{
    Wizard *w=new Wizard();
    w->setModal(true);
    w->show();
    w->move((QApplication::desktop()->width()- w->width())/2, (QApplication::desktop()->height() - w->height())/2);


}

void testbase::on_ButtonQuit_clicked()
{
    this->accept();
}

void testbase::on_ButtonPaperAnalysis_clicked()
{
    TestAnalysis *paper=new TestAnalysis();
    paper->setModal(true);
    paper->move((QApplication::desktop()->width()- paper->width())/2, (QApplication::desktop()->height() - paper->height())/2);
    //int retpaperID=paper->exec();
    paper->show();

}

